package cc.uncarbon.module.config;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanNameGenerator;

public class CustomNameGenerator implements BeanNameGenerator {
    @Override
    public String generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry) {
        // 实现自定义的命名逻辑，例如结合类名和包名
        String className = definition.getBeanClassName();
        return className + "@" + definition.getBeanClassName().hashCode();
    }
}
